package com.newtouch.bxzs.business.message.threadtask;

import com.newtouch.bxzs.business.train.model.vo.KnowledgeCardAppVO;
import com.newtouch.bxzs.business.train.service.KnowledgeCardService;

import java.util.concurrent.Callable;

/**
 * KnowledgeCardClientTask: 获取知识卡片列表task
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/21 16:13</td>
 * <td>tianshangzhu</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author tianshangzhu
 * @version 1.0.0   AnnouncementAndAdvertisement
 * @since 1.0.0
 */
public class KnowledgeCardClientTask implements Callable<Object> {
    private final KnowledgeCardService knowledgeCardService;

    public KnowledgeCardClientTask(KnowledgeCardService knowledgeCardService) {
        this.knowledgeCardService = knowledgeCardService;
    }

    /**
     * 查询知识小灵通任务
     * @return Object
     */
    @Override
    public Object call(){
        // 封装查询参数
        KnowledgeCardAppVO knowledgeCardAppVO = new KnowledgeCardAppVO();
        knowledgeCardAppVO.setCurrentPage(1);
        knowledgeCardAppVO.setPageSize(2);
        // 执行查询
        return knowledgeCardService.getKnowledgeCardList(knowledgeCardAppVO,true);
    }
}
